package com.yonyou.pmclouds.businessobject.util;

public enum BusinessObjectEnum {

    PM_CONSTRUCTIONLOG("pm_constructionlog","/completedCollate/preview/printPreviewConstructionLog"),
    PMBD_PROCEDUREINSPECT("pmbd_procedureinspect","/completedCollate/preview/printPreviewProcedureInspect");

    private String code;
    private String name;

    private BusinessObjectEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static String getName(String code) {
        for(BusinessObjectEnum businessObjectEnum : BusinessObjectEnum.values()) {
            if(businessObjectEnum.getCode().equalsIgnoreCase(code)) {
                return businessObjectEnum.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
